package cn.pku.sirx.snad.ad.domain.impl;

import java.io.Serializable;

import cn.pku.sirx.snad.ad.dao.IDao;
import cn.pku.sirx.snad.ad.domain.IFacade;

/**
 * @author WangXiao
 */
public abstract class FacadeImpl<T, DaoT extends IDao<T>> implements IFacade<T> {

	public Serializable insert(T object) {
		return dao.insert(object);
	}

	public void update(T object) {
		dao.update(object);
	}

	public void delete(T object) {
		dao.delete(object);
	}

	public void delete(Long id) {
		dao.delete(id);
	}

	public T get(Long id) {
		return dao.get(id);
	}

	@Override
	public T get(String id) {
		return dao.get(id);
	}

	public void setDao(DaoT dao) {
		this.dao = dao;
	}

	protected DaoT dao;

}
